#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 2010;

int n, m, v, e;
int c[N], d[N];
db k[N];
int dis[N][N];
db f[2][N][2], ret[N][2][2];

int main() {
#ifdef YJR_2333_TEST
	freopen("1.in", "r", stdin);
#endif
	n = in, m = in, v = in, e = in;
	rep(i, 1, n) c[i] = in;
	rep(i, 1, n) d[i] = in;
	rep(i, 1, n) scanf("%lf", &k[i]);
	memset(dis, 0x3f, sizeof dis);
	rep(i, 1, e) {
		int u = in, v = in, w = in;
		chkmin(dis[u][v], w); chkmin(dis[v][u], w);
	}
	rep(i, 1, v) dis[i][i] = 0;
	rep(i, 1, v) rep(j, 1, v) rep(k, 1, v) chkmin(dis[j][k], dis[j][i] + dis[i][k]);
	rep(i, 2, n) {
		rep(j, 0, 1) {
			vector < pair < int, db > > pot1;
			if(j == 0) pot1.eb(c[i - 1], 1);
			else pot1.eb(d[i - 1], k[i - 1]), pot1.eb(c[i - 1], 1 - k[i - 1]);
			rep(t, 0, 1) {
				vector < pair < int, db > > pot2;
				if(t == 0) pot2.eb(c[i], 1);
				else pot2.eb(d[i], k[i]), pot2.eb(c[i], 1 - k[i]);
				for(auto x : pot1) for(auto y : pot2) {
						ret[i][j][t] += x.se * y.se * dis[x.fi][y.fi];
					}
			}
		}
	}
	int o = 0; rep(c, 0, m) rep(i, 0, 1) f[o][c][i] = 1e9;
	f[o][0][0] = 0; f[o][1][1] = 0;
	rep(i, 2, n) {
		rep(c, 0, m) rep(i, 0, 1) f[o ^ 1][c][i] = 1e9;
		rep(c, 0, m)
			rep(j, 0, 1) rep(t, 0, 1) chkmin(f[o ^ 1][c + t][t], f[o][c][j] + ret[i][j][t]);
		o ^= 1;
	}
	db ans = 1e9; rep(c, 0, m) rep(t, 0, 1) chkmin(ans, f[o][c][t]);
	printf("%.2lf\n", ans);
	return 0;
}
